<div class="form">
    <form name="form" action="" method="post">
        <fieldset>
            <legend>{add_new}:</legend>
            <span style="color: red;font-weight: bold;display: block;margin: 0 0 10px 7px;">{error}</span>
            <span style="color: blue;font-weight: bold;display: block;margin: 0 0 10px 7px;">{success}</span>
            <div class="input_wrapper">
                
                
                <div class="input">
                    <label>{com}: </label>
                    <span>
                        <select name="com">
                            <option value="">{com_choose_text}</option>
                    [OPEN list_com]
                        [LOOP com]
                            <option value="{com_id}">{com_value}</option>
                        [/LOOP com]
                    [CLOSE list_com]
                        </select>
                    </span>
                </div>
                <div class="input">
                    <label>{model}: </label>
                    <span>
                        <input name="model" type="text" />
                    </span>
                </div>
          
                
            
                <div class="input submit">
                    <input type="submit" name="save" value="{save}" />
                </div>
                <input type="hidden" name="app" value="{app}" />
            </div>
        </fieldset>
    </form>
</div>
<script type="text/javascript">
var app = '{app}';
$(document).ready(function(){
   $('input[name="save"]').click(function(){
        var error = false;
        com_id = $('select[name="com"] option:selected').val();
        model_name = $('input[name="model"]').val();
        if(com_id == ''){
            alert('Xin vui lòng chọn Com muốn thêm!');
            return false;
        }
        if(model_name == ''){
            alert('Xin vui lòng thêm tên model');
            return false;
        }
        
   }); 
});
</script>